<template>
	<view class="flex-col container">
		<z-paging ref="paging" v-model="list" @query="getList" :empty-view-fixed="true" :default-page-size="limit">
			<view class="wallet-box">
				<view class="notice-view flex-row-center store-text">
					<image :src="$getImgUrl('mine/ic_gg.png')" mode="widthFix"></image>
					<uni-notice-bar single scrollable background-color="#fff" color="#000" :speed="30" :text="noticeText"></uni-notice-bar>
				</view>

				<view class="yuanqishi-view flex-row-center">
					<view class="money-item">
						<view class="money-val">{{ userInfo.coin }}</view>
						<view class="money-text">余额</view>
					</view>
					<view class="money-line"></view>
					<view class="money-item">
						<view class="money-val">{{ userInfo.jifen }}</view>
						<view class="money-text">积分</view>
					</view>
				</view>
			</view>

			<view class="list-view">
				<v-tabs
					color="#999"
					activeColor="#000000"
					lineHeight="6rpx"
					lineColor="#000000"
					lineRadius="12rpx"
					:lineScale="0.1"
					v-model="current"
					:scroll="false"
					:tabs="tabs"
					@change="changeTab"
				></v-tabs>
				<view class="line"></view>

				<view class="scroll-view">
					<view class="yuanqi-item flex-row-between" v-for="(item, index) in list" :key="index">
						<image :src="$getImgUrl('mine/ic_yemx.png')" v-if="current == 0" mode="widthFix" class="img-wallet"></image>
						<image :src="$getImgUrl('mine/ic_jfmx.png')" v-if="current == 1" mode="widthFix" class="img-wallet"></image>

						<view class="yuanqi-left">
							<view class="yuanqi-title">{{ item.desc }}</view>
							<view class="yuanqi-time">{{ item.createtime }}</view>
						</view>
						<view class="yuanqi-val">{{ item.type == 1 ? '+' : '-' }} {{ item.num }}</view>
					</view>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script src="./wallet.js"></script>

<style lang="scss">
@import '@/style/common.scss';
@import './wallet.scss';
</style>
